<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:gui="clr-namespace:DentalGUIHelper;assembly=DentalConfig">
	<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>

    <!-- PleaseWaitForLoadingWindow Style -->
    <Style TargetType="{x:Type gui:PleaseWaitForLoadingWindow}">
        <Setter Property="Background" Value="{DynamicResource PleaseWaitForLoadingBackground}" />
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{DynamicResource BrandBrush1}" />
		<Setter Property="SizeToContent" Value="Height"/>
		<Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type gui:PleaseWaitForLoadingWindow}">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
                        <Grid Background="{TemplateBinding Background}">
                            <AdornerDecorator>
                                <DockPanel Background="{TemplateBinding Background}">
                                    <StackPanel Orientation="Horizontal"> 
										<gui:BizzySpinner Spin="true" Margin="10 0 0 0" Width="32" Height="32" VerticalAlignment="Center" LeaderBrush="{DynamicResource PleaseWaitForLoadingSpinnerLeaderBrush}" TailBrush="{DynamicResource PleaseWaitForLoadingSpinnerTailBrush}"/>
										<TextBlock Foreground="{DynamicResource PleaseWaitForLoadingForeground}" Margin="10 20 20 20" VerticalAlignment="Center" Text="{TemplateBinding ShowingMessage}" Visibility="{TemplateBinding MessageTextVisible, Converter={StaticResource BooleanToVisibilityConverter}}"/>
									</StackPanel>
                                </DockPanel>
                            </AdornerDecorator>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>